<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQaecmsCollectdatasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qaecms_collectdatas', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('id');
            $table->string('type')->comment('类型');
            $table->string('title')->comment('视频/文章标题');
            $table->integer('sid')->comment('视频/文章资源id')->nullable();
            $table->integer('stid')->comment('视频/文章资源分类ID')->nullable();
            $table->string('stype')->comment('视频/文章资源分类名称')->nullable();
            $table->string('lang')->comment('视频/文章语言')->default('未知')->nullable();
            $table->string('area')->comment('视频/文章区域')->default('未知')->nullable();
            $table->string('year')->comment('视频/文章年份')->default('1970')->nullable();
            $table->string('note')->comment('视频/文章清晰度')->default('未知')->nullable();
            $table->integer('score')->comment('评分')->default('0')->nullable();
            $table->mediumText('actor')->comment('视频/文章演员')->nullable();
            $table->mediumText('director')->comment('视频/文章导演')->nullable();
            $table->mediumText('introduction')->comment('视频/文章简介')->nullable();
            $table->mediumText('seokey')->comment('视频/文章seo关键字用逗号隔开')->nullable();
            $table->mediumText('thumbnail')->comment('视频/文章缩略图')->nullable();
            $table->string('shost',200)->comment('视频/文章来源host')->nullable();
            $table->longText('content')->comment('视频/文章地址')->nullable();
            $table->dateTime('last')->comment('视频/文章最新更新时间')->nullable();
            $table->string('editor')->comment('文章作者名称')->nullable();
            $table->string('onlykey')->comment("唯一值")->unique();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qaecms_collectdatas');
    }
}
